package com.tomorrowbbs.domain.enums;

public enum AttachmentFileTypeEnum {
    ZIP(0,new String[]{"zip","rar"},"压缩包");

    private Integer type;
    public String[] suffixs;
    private String desc;



    AttachmentFileTypeEnum(Integer type,  String[] suffixs,String desc) {
        this.type = type;
        this.desc = desc;
        this.suffixs = suffixs;
    }

    public static AttachmentFileTypeEnum getByType(Integer type) {
        for (AttachmentFileTypeEnum attachmentFileTypeEnum : AttachmentFileTypeEnum.values()) {
            if (attachmentFileTypeEnum.equals(type)) {
                return attachmentFileTypeEnum;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public String[] getSuffixs() {
        return suffixs;
    }

    public String getDesc() {
        return desc;
    }
}
